<template>
  <div>
     <el-form ref="form" :model="form" label-width="80px">
        <el-form-item label="姓名">
          <el-input v-model="form.name"></el-input>
        </el-form-item>
        <el-form-item label="年龄">
          <el-input v-model="form.age"></el-input>
        </el-form-item>
        <el-form-item>
          <el-button type="primary" @click="handleSub">立即创建</el-button>
          <el-button>取消</el-button>
        </el-form-item>
      </el-form>
  </div>
</template>


<script>
export default {
  data() {
    return {
      form: {
        name: "",
        age: ""
      }
    };
  },
  methods:{
      handleSub(){
          this.$emit('handleSub',this.form)
      }
  }
};
</script>
